package 练习.数的分解;

public class test {

	public static boolean judge(int num){
		String s = num+"";
		if (!s.contains("2") && !s.contains("4") ){
			return true;
		}
		return false;
	}
	public static void main(String[] args) {
		int count = 0;
		for (int i = 1; i <= 2019 ; i++) {
			for (int j = 1; j <2019; j++) {
				for (int k = 1; k <2019; k++) {
					if(i+j+k==2019){
						if(i!=j && i!=k && j!=k){
							if(judge(i) && judge(j) && judge(k)){
								count++;
							}
						}
					}
				}
			}
		}
		System.out.println(count/6);
	}
}
